//
//  CTVerificationLogic.h
//  ConstellationTalk_0.1
//
//  Created by riley on 15/4/22.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CTLoginItems.h"

@protocol CTVerificationLogicDelegate;

typedef void (^requestSuccessBlock) ();
typedef void (^requestFailedBlock) ();

@interface CTVerificationLogic : NSObject

@property(nonatomic,assign)id<CTVerificationLogicDelegate>delegate;


-(void)verificationTimerStatrt:(NSString*)phoneNumber area:(NSString*)zone;

-(void)verificationRequest:(CTVerificationRequestItem *)item
                verifyCode:(NSString *)code
    successCompletionHandler:(requestSuccessBlock)successBlock
               failedHandler:(requestFailedBlock)failedBlock;


-(void)deallocVerficationLogic;

@end


@protocol CTVerificationLogicDelegate <NSObject>

@optional
//timer
-(void)timerDidStart:(CTVerificationLogic *)logic withTime:(int)sec;
-(void)timerDidFinish:(CTVerificationLogic *)logic;


-(void)sendMessageSuccess:(CTVerificationLogic *)logic;
-(void)sendMessageFailed:(CTVerificationLogic *)logic;

@end